package mainDemo01;

public class MainDemo2 {
    public static void main(String[] args) {
        int[] arr = {11,22,33,44,55};
        System.out.println(max(arr));
    }
    public static int max(int[] arr){
        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            max = arr[i] > max ? max = arr[i] : max;
            }
        return max;
        }

    }
